﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;

namespace Function
{
    public partial class FunctionForm : Form
    {
        Form Index;
        bool isExit = true;
        string[] o5 = new string[300];
        string[] o4 = new string[300];
        int i5 = 0, i4 = 0;

        public FunctionForm()
        {
            InitializeComponent();
        }

        public FunctionForm(Form Index)
        {
            InitializeComponent();
            this.Index = Index;
        }

        private void FunctionForm_Load(object sender, EventArgs e)
        {
            //5神里绫华
            o5[i5] = "神里绫华"; i5++;
            //5琴
            o5[i5] = "琴"; i5++;
            //4丽莎
            o4[i4] = "丽莎"; i4++;
            //5荧
            o5[i5] = "荧"; i5++;
            //4芭芭拉
            o4[i4] = "芭芭拉"; i4++;
            //4凯亚
            o4[i4] = "凯亚"; i4++;
            //5迪卢克
            o5[i5] = "迪卢克"; i5++;
            //4雷泽
            o4[i4] = "雷泽"; i4++;
            //4安柏
            o4[i4] = "安柏"; i4++;
            //5温迪
            o5[i5] = "温迪"; i5++;
            //4香菱
            o4[i4] = "香菱"; i4++;
            //4北斗
            o4[i4] = "北斗"; i4++;
            //4行秋
            o4[i4] = "行秋"; i4++;
            //5魈
            o5[i5] = "魈"; i5++;
            //4凝光
            o4[i4] = "凝光"; i4++;
            //5可莉
            o5[i5] = "可莉"; i5++;
            //5钟离
            o5[i5] = "钟离"; i5++;
            //4菲谢尔
            o4[i4] = "菲谢尔"; i4++;
            //4班尼特
            o4[i4] = "班尼特"; i4++;
            //5达达利亚
            o5[i5] = "达达利亚"; i5++;
            //4诺艾尔
            o4[i4] = "诺艾尔"; i4++;
            //5七七
            o5[i5] = "七七"; i5++;
            //4重云
            o4[i4] = "重云"; i4++;
            //5甘雨
            o5[i5] = "甘雨"; i5++;
            //5阿贝多
            o5[i5] = "阿贝多"; i5++;
            //4迪奥娜
            o4[i4] = "迪奥娜"; i4++;
            //5莫娜
            o5[i5] = "莫娜"; i5++;
            //5刻晴
            o5[i5] = "刻晴"; i5++;
            //4砂糖
            o4[i4] = "砂糖"; i4++;
            //4辛焱
            o4[i4] = "辛焱"; i4++;
            //4罗莎莉亚
            o4[i4] = "罗莎莉亚"; i4++;
            //5胡桃
            o5[i5] = "胡桃"; i5++;
            //5枫原万叶
            o5[i5] = "枫原万叶"; i5++;
            //4烟绯
            o4[i4] = "烟绯"; i4++;
            //5宵宫
            o5[i5] = "宵宫"; i5++;
            //4托马
            o4[i4] = "托马"; i4++;
            //5优菈
            o5[i5] = "优菈"; i5++;
            //5雷电将军
            o5[i5] = "雷电将军"; i5++;
            //4早柚
            o4[i4] = "早柚"; i4++;
            //5珊瑚宫心海
            o5[i5] = "珊瑚宫心海"; i5++;
            //4五郎
            o4[i4] = "五郎"; i4++;
            //4九条裟罗
            o4[i4] = "九条裟罗"; i4++;
            //5荒泷一斗
            o5[i5] = "荒泷一斗"; i5++;
            //5八重神子
            o5[i5] = "八重神子"; i5++;
            //4鹿野院平藏
            o4[i4] = "鹿野院平藏"; i4++;
            //5夜兰
            o5[i5] = "夜兰"; i5++;
            //5埃洛伊
            o5[i5] = "埃洛伊"; i5++;
            //5申鹤
            o5[i5] = "申鹤"; i5++;
            //4云堇
            o4[i4] = "云堇"; i4++;
            //4久歧忍
            o4[i4] = "久歧忍"; i4++;
            //5神里绫人
            o5[i5] = "神里绫人"; i5++;
            //4柯莱
            o4[i4] = "柯莱"; i4++;
            //4多莉
            o4[i4] = "多莉"; i4++;
            //5提纳里
            o5[i5] = "提纳里"; i5++;
            //5妮露
            o5[i5] = "妮露"; i5++;
            //5赛诺
            o5[i5] = "赛诺"; i5++;
            //4坎蒂丝
            o4[i4] = "坎蒂丝"; i4++;
            //5纳西妲
            o5[i5] = "纳西妲"; i5++;
            //4莱依拉
            o4[i4] = "莱依拉"; i4++;
            //5流浪者
            o5[i5] = "流浪者"; i5++;
            //4珐露珊
            o4[i4] = "珐露珊"; i4++;
            //4瑶瑶
            o4[i4] = "瑶瑶"; i4++;
            //5艾尔海森
            o5[i5] = "艾尔海森"; i5++;
            //4西风剑
            o4[i4] = "西风剑"; i4++;
            //4笛剑
            o4[i4] = "笛剑"; i4++;
            //4祭礼剑
            o4[i4] = "祭礼剑"; i4++;
            //4宗室长剑
            o4[i4] = "宗室长剑"; i4++;
            //4匣里龙吟
            o4[i4] = "匣里龙吟"; i4++;
            //4试作斩岩
            o4[i4] = "试作斩岩"; i4++;
            //4铁蜂刺
            o4[i4] = "铁蜂刺"; i4++;
            //4黑岩长剑
            o4[i4] = "黑岩长剑"; i4++;
            //4黑剑
            o4[i4] = "黑剑"; i4++;
            //4暗巷闪光
            o4[i4] = "暗巷闪光"; i4++;
            //4降临之剑
            o4[i4] = "降临之剑"; i4++;
            //4腐殖之剑
            o4[i4] = "腐殖之剑"; i4++;
            //4天目影打刀
            o4[i4] = "天目影打刀"; i4++;
            //4辰砂之纺锤
            o4[i4] = "辰砂之纺锤"; i4++;
            //4笼钓瓶一心
            o4[i4] = "笼钓瓶一心"; i4++;
            //4原木刀
            o4[i4] = "原木刀"; i4++;
            //4西福斯的月光
            o4[i4] = "西福斯的月光"; i4++;
            //4东花坊时雨
            o4[i4] = "东花坊时雨"; i4++;
            //5风鹰剑
            o5[i5] = "风鹰剑"; i5++;
            //5天空之刃
            o5[i5] = "天空之刃"; i5++;
            //5苍古自由之誓
            o5[i5] = "苍古自由之誓"; i5++;
            //5斫峰之刃
            o5[i5] = "斫峰之刃"; i5++;
            //5磐岩结绿
            o5[i5] = "磐岩结绿"; i5++;
            //5雾切之回光
            o5[i5] = "雾切之回光"; i5++;
            //5波乱月白经津
            o5[i5] = "波乱月白经津"; i5++;
            //5圣显之钥
            o5[i5] = "圣显之钥"; i5++;
            //5裁叶萃光
            o5[i5] = "裁叶萃光"; i5++;
            //4西风大剑
            o4[i4] = "西风大剑"; i4++;
            //4钟剑
            o4[i4] = "钟剑"; i4++;
            //4祭礼大剑
            o4[i4] = "祭礼大剑"; i4++;
            //4宗室大剑
            o4[i4] = "宗室大剑"; i4++;
            //4雨裁
            o4[i4] = "雨裁"; i4++;
            //4试作古华
            o4[i4] = "试作古华"; i4++;
            //4白影剑
            o4[i4] = "白影剑"; i4++;
            //4黑岩斩刀
            o4[i4] = "黑岩斩刀"; i4++;
            //4螭骨剑
            o4[i4] = "螭骨剑"; i4++;
            //4千岩古剑
            o4[i4] = "千岩古剑"; i4++;
            //4雪葬的星银
            o4[i4] = "雪葬的星银"; i4++;
            //4衔珠海皇
            o4[i4] = "衔珠海皇"; i4++;
            //4桂木斩长正
            o4[i4] = "桂木斩长正"; i4++;
            //4玛海菈的水色
            o4[i4] = "玛海菈的水色"; i4++;
            //4恶王丸
            o4[i4] = "恶王丸"; i4++;
            //4森林王器
            o4[i4] = "森林王器"; i4++;
            //5天空之傲
            o5[i5] = "天空之傲"; i5++;
            //5狼的末路
            o5[i5] = "狼的末路"; i5++;
            //5松籁响起之时
            o5[i5] = "松籁响起之时"; i5++;
            //5无工之剑
            o5[i5] = "无工之剑"; i5++;
            //5赤角石溃杵
            o5[i5] = "赤角石溃杵"; i5++;
            //4匣里灭辰
            o4[i4] = "匣里灭辰"; i4++;
            //4试作星镰
            o4[i4] = "试作星镰"; i4++;
            //4流月针
            o4[i4] = "流月针"; i4++;
            //4黑岩刺枪
            o4[i4] = "黑岩刺枪"; i4++;
            //4决斗之枪
            o4[i4] = "决斗之枪"; i4++;
            //千岩长枪
            o4[i4] = "千岩长枪"; i4++;
            //4西风长枪
            o4[i4] = "西风长枪"; i4++;
            //4宗室猎枪
            o4[i4] = "宗室猎枪"; i4++;
            //4龙脊长枪
            o4[i4] = "龙脊长枪"; i4++;
            //4喜多院十文字
            o4[i4] = "喜多院十文字"; i4++;
            //4渔获
            o4[i4] = "渔获"; i4++;
            //4断浪长鳍
            o4[i4] = "断浪长鳍"; i4++;
            //4贯月矢
            o4[i4] = "贯月矢"; i4++;
            //4风信之锋
            o4[i4] = "风信之锋"; i4++;
            //5护摩之杖
            o5[i5] = "护摩之杖"; i5++;
            //5天空之脊
            o5[i5] = "天空之脊"; i5++;
            //5贯虹之槊
            o5[i5] = "贯虹之槊"; i5++;
            //5和璞鸢
            o5[i5] = "和璞鸢"; i5++;
            //5息灾
            o5[i5] = "息灾"; i5++;
            //5‌薙草之稻光
            o5[i5] = "薙草之稻光"; i5++;
            //5赤沙之杖
            o5[i5] = "赤沙之杖"; i5++;
            //4西风秘典
            o4[i4] = "西风秘典"; i4++;
            //4流浪乐章
            o4[i4] = "流浪乐章"; i4++;
            //4祭礼残章
            o4[i4] = "祭礼残章"; i4++;
            //4宗室秘法录
            o4[i4] = "宗室秘法录"; i4++;
            //4匣里日月
            o4[i4] = "匣里日月"; i4++;
            //4试作金珀
            o4[i4] = "试作金珀"; i4++;
            //4万国诸海图谱
            o4[i4] = "万国诸海图谱"; i4++;
            //4黑岩绯玉
            o4[i4] = "黑岩绯玉"; i4++;
            //4昭心
            o4[i4] = "昭心"; i4++;
            //4暗巷的酒与诗
            o4[i4] = "暗巷的酒与诗"; i4++;
            //4忍冬之果
            o4[i4] = "忍冬之果"; i4++;
            //4嘟嘟可故事集
            o4[i4] = "嘟嘟可故事集"; i4++;
            //4白辰之环
            o4[i4] = "白辰之环"; i4++;
            //4证誓之明瞳
            o4[i4] = "证誓之明瞳"; i4++;
            //4流浪的晚星
            o4[i4] = "流浪的晚星"; i4++;
            //4盈满之实
            o4[i4] = "盈满之实"; i4++;
            //5天空之卷
            o5[i5] = "天空之卷"; i5++;
            //5四风原典
            o5[i5] = "四风原典"; i5++;
            //5尘世之锁
            o5[i5] = "尘世之锁"; i5++;
            //5不灭月华
            o5[i5] = "不灭月华"; i5++;
            //5神乐之真意
            o5[i5] = "神乐之真意"; i5++;
            //5千夜浮梦
            o5[i5] = "千夜浮梦"; i5++;
            //5图莱杜拉的回忆
            o5[i5] = "图莱杜拉的回忆"; i5++;
            //4西风猎弓
            o4[i4] = "西风猎弓"; i4++;
            //4绝弦
            o4[i4] = "绝弦"; i4++;
            //4祭礼弓
            o4[i4] = "祭礼弓"; i4++;
            //4宗室长弓
            o4[i4] = "宗室长弓"; i4++;
            //4弓藏
            o4[i4] = "弓藏"; i4++;
            //4试作澹月
            o4[i4] = "试作澹月"; i4++;
            //4钢轮弓
            o4[i4] = "钢轮弓"; i4++;
            //4黑岩战弓
            o4[i4] = "黑岩战弓"; i4++;
            //4苍翠猎弓
            o4[i4] = "苍翠猎弓"; i4++;
            //4暗巷猎手
            o4[i4] = "暗巷猎手"; i4++;
            //4落霞
            o4[i4] = "落霞"; i4++;
            //4幽夜华尔兹
            o4[i4] = "幽夜华尔兹"; i4++;
            //4风花之颂
            o4[i4] = "风花之颂"; i4++;
            //4破魔之弓
            o4[i4] = "破魔之弓"; i4++;
            //4掠食者
            o4[i4] = "掠食者"; i4++;
            //4曚云之月
            o4[i4] = "曚云之月"; i4++;
            //4王下近侍
            o4[i4] = "王下近侍"; i4++;
            //4竭泽
            o4[i4] = "竭泽"; i4++;
            //5天空之翼
            o5[i5] = "天空之翼"; i5++;
            //5阿莫斯之弓
            o5[i5] = "阿莫斯之弓"; i5++;
            //5终末嗟叹之诗
            o5[i5] = "终末嗟叹之诗"; i5++;
            //5冬极白星
            o5[i5] = "冬极白星"; i5++;
            //5若水
            o5[i5] = "若水"; i5++;
            //5飞雷之弦振
            o5[i5] = "飞雷之弦振"; i5++;
            //5猎人之径
            o5[i5] = "猎人之径"; i5++;
        }

        private void FunctionForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (isExit) Application.Exit();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            listBox1.Items.Clear();
            // 抽卡一次,10%抽到5星,90%抽到4星
            Random random = new Random();
            int num = random.Next(1, 101);
            if (num <= 10)
            {
                int index = random.Next(0, i5);
                listBox1.Items.Add(o5[index]);
            }
            else
            {
                int index = random.Next(0, i4);
                listBox1.Items.Add(o4[index]);
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            listBox1.Items.Clear();
            // 抽卡一次,10%抽到5星,90%抽到4星
            Random random = new Random();
            for (int i = 0; i < 5; i++)
            {
                int num = random.Next(1, 101);
                if (num <= 10)
                {
                    int index = random.Next(0, i5);
                    listBox1.Items.Add(o5[index]);
                }
                else
                {
                    int index = random.Next(0, i4);
                    listBox1.Items.Add(o4[index]);
                }
            }
        }

        private void button3_Click(object sender, EventArgs e)
        {
            listBox1.Items.Clear();
            // 抽卡一次,10%抽到5星,90%抽到4星
            Random random = new Random();
            for (int i = 0; i < 10; i++)
            {
                int num = random.Next(1, 101);
                if (num <= 10)
                {
                    int index = random.Next(0, i5);
                    listBox1.Items.Add(o5[index]);
                }
                else
                {
                    int index = random.Next(0, i4);
                    listBox1.Items.Add(o4[index]);
                }
            }
        }

        private void button4_Click(object sender, EventArgs e)
        {
            Index.Show();
            Index.Location=this.Location;
            isExit = false;
            this.Close();
        }
    }
}
